﻿using System;
using System.Collections.Generic;
using System.ComponentModel;

namespace MIXer.Core.Domain
{
    public enum TechEventType
    {
        MIX,
        PDC,
        TechDays,
        TechEd,
        BUILD,
        aspConf,
        CommunityDay
    }

    public class TechEventDownloadUrl : INotifyPropertyChanged
    {
        #region Fields
        private string _description;
        private Uri _address;
        #endregion

        #region Events
        public event PropertyChangedEventHandler PropertyChanged;
        #endregion

        #region Methods
        private void NotifyPropertyChanged(string info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(info));
            }
        }
        #endregion

        #region Properties
        public string Description 
        {
            get { return _description; }
            set 
            {
                _description = value;

                NotifyPropertyChanged("Description");
            }
        }
        public Uri Address 
        {
            get { return _address; }
            set 
            {
                _address = value;

                NotifyPropertyChanged("Address");
            }
        }
        #endregion
    }

    public class TechEvent : INotifyPropertyChanged
    {
        #region Fields
        private string _eventCode;
        private string _eventFriendlyName;
        private TechEventType _type;
        private DateTime _startDate;
        private DateTime _endDate;
        private List<TechEventDownloadUrl> _links;
        #endregion

        #region Events
        public event PropertyChangedEventHandler PropertyChanged;
        #endregion

        #region Methods
        private void NotifyPropertyChanged(string info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(info));
            }
        }
        #endregion

        #region Properties
        public string EventCode 
        {
            get { return _eventCode; }
            set 
            {
                _eventCode = value;

                NotifyPropertyChanged("EventCode");
            }
        }
        public string EventFriendlyName 
        {
            get { return _eventFriendlyName; }
            set 
            {
                _eventFriendlyName = value;

                NotifyPropertyChanged("EventFriendlyName");
            }
        }
        public TechEventType Type 
        {
            get { return _type; }
            set 
            {
                _type = value;

                NotifyPropertyChanged("Type");
            }
        }
        public DateTime StartDate 
        {
            get { return _startDate; }
            set 
            {
                _startDate = value;

                NotifyPropertyChanged("StartDate");
            }
        }
        public DateTime EndDate 
        {
            get { return _endDate; }
            set 
            {
                _endDate = value;

                NotifyPropertyChanged("EndDate");
            }
        }
        public List<TechEventDownloadUrl> Links 
        {
            get { return _links; }
            set 
            {
                _links = value;

                NotifyPropertyChanged("Links");
            }
        }
        #endregion
    }
}
